home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2005 Utilities / CHIP Utilities 2005.7z / CHIP Utilities 2005.iso / CHIP Utilities / Zarzadzanie i bezpieczenstwo systemu / MBSA / MBSASetup-EN.msi / Data.Cab / reportdetailsIEZones.xsl < prev    next >
Extensible Markup Language  |  2004-08-13  |  3KB  |  78 lines

  1. <?xml version="1.0"?> 
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.     
  4.     <xsl:variable name="CheckID" select="'CheckIDHere'"></xsl:variable>
  5.  
  6.     <xsl:variable name="ScoreLookup">
  7.       <c score="0" url="Graphics/dash.gif" alttext="Check Not Performed"/>
  8.       <c score="1" url="Graphics/excl_red.gif" alttext="Unable to scan"/>
  9.       <c score="2" url="Graphics/x_red.gif" alttext="Check failed (critical)"/>
  10.       <c score="3" url="Graphics/x_gold.gif" alttext="Check failed (non-critical)"/>
  11.       <c score="4" url="Graphics/astrx.gif" alttext="Best practice"/>
  12.       <c score="5" url="Graphics/chek_grn.gif" alttext="Check passed"/>
  13.       <c score="7" url="Graphics/info.gif" alttext="Additional information"/>
  14.     </xsl:variable>
  15.     
  16.     <xsl:template match="SecScan">
  17.         
  18.             <h1><xsl:value-of select="Check[@ID=$CheckID]/Advice"/></h1>
  19.             <h2>Result Details
  20.             <br /><br /><xsl:value-of select="Check[@ID=$CheckID]/Detail/@text"/></h2>
  21.             <table id="TableID" width="100%" border="0" cellpadding="0" cellspacing="0" style="border: solid 1px #000000; padding-left: 10px; padding-right: 10px;">
  22.             <tr class="DetailHeader">
  23.                 <td class="ReportListHeader" style="width:40" align="center" valign="middle"><nobr>  Score  </nobr></td>
  24.                 <xsl:for-each select="Check[@ID=$CheckID]/Detail/Head/Col">
  25.                     <td nowrap="nowrap">
  26.                         <xsl:value-of select="."/> 
  27.                     </td>
  28.                 </xsl:for-each>
  29.             </tr>
  30.             
  31.             <xsl:for-each select="Check[@ID=$CheckID]/Detail">
  32.                 <xsl:apply-templates select="Row">
  33.                 </xsl:apply-templates>
  34.             </xsl:for-each>
  35.             </table>
  36.     </xsl:template>
  37.  
  38.     <xsl:template match="Row">
  39.         <xsl:param name="score" select="@Grade"/>
  40.         <tr>
  41.             <td valign="top" align="center">
  42.                 <IMG alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@url}" />
  43.             </td>
  44.             <xsl:for-each select="Col">
  45.                 <td valign="top">
  46.                 <xsl:variable name="SubID" select="../SETTINGS/@ID"></xsl:variable>
  47.                 <xsl:variable name="ZoneName" select="../Col[@HasZoneName='true']"></xsl:variable>
  48.  
  49.                 <xsl:choose>
  50.                     <xsl:when test="@custom='true'">
  51.                         <xsl:choose>
  52.                             <xsl:when test="../SETTINGS">
  53.                                 <a href="javascript:OpenIEZonesSubDetails('{$ZoneName}', '{$SubID}');"><xsl:value-of select="."/></a>
  54.                             </xsl:when>
  55.                             <xsl:otherwise>
  56.                                 <xsl:value-of select="."/>
  57.                             </xsl:otherwise>
  58.                         </xsl:choose>
  59.                     </xsl:when>
  60.                     <xsl:when test="@custom='false'">
  61.                         <xsl:value-of select="."/>
  62.                         <xsl:choose>
  63.                             <xsl:when test="../SETTINGS">
  64.                                 (<a href="javascript:OpenIEZonesSubDetails('{$ZoneName}', '{$SubID}');">Custom</a>)
  65.                             </xsl:when>
  66.                         </xsl:choose>
  67.                     </xsl:when>
  68.                     <xsl:otherwise>
  69.                         <xsl:value-of select="."/>
  70.                     </xsl:otherwise>
  71.                 </xsl:choose>
  72.                 </td>
  73.             </xsl:for-each>
  74.         </tr>
  75.     </xsl:template>
  76.     
  77. </xsl:stylesheet>
  78.